<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{webjars/jquery/3.6.4/jquery.min.js}"></script>
    <link  th:href="@{webjars/bootstrap/5.2.3/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
        <div class="container">
             <form action="save" method="post" th:object="${student}">
                 <input type="hidden" name="id" th:value="*{id}">
                  姓名：<input type="text" name="name" th:value="*{name}"><br>
                  性别：<input type="radio" name="sex" th:value="0" th:checked="*{sex==0}">男
                       <input type="radio" name="sex" th:value="1" th:checked="*{sex==1}">女<br>
                   年龄：<input type="text" name="age" th:value="*{age}"><br>
                 生日：<input type="text" name="birthday" th:value="*{#dates.format(birthday,'yyyy-MM-dd')}"><br>
                 班级：<select name="rid">
                      <option>-请选择-</option>
                         <ul th:each="room:${rs}" th:object="${room}">
                              <option th:value="*{id}" th:text="*{rname}"  th:selected="${room.id==student.rid}"></option>
                         </ul>
             </select><br>
                 <button class="btn btn-success">提交</button>
             </form>
        </div>
</body>
</html>
